<?php
namespace Client\Controller;

use Zend\View\Model\ViewModel;

class FeedbackController extends InitializeController
{

	public function saveMessageAction(){
		$request=$this->getRequest();
		$userId=$request->getPost('user_id');
		$cellphone=$request->getPost('cellphone');
		$message=$request->getPost('message');
		$rs=array('status'=>"failed");
		
		$query=array(
			'user_id'=>$userId?$userId:123,
			'cellphone'=>$cellphone,
			'message'=>$message
		);
		$id=$this->getFeedbackTable()->insertMassage($query);
		if($id){
			$rs=array("status"=>"success");
		}
		
		echo json_encode($rs);die;
	}
	
}